import { MessageBox } from 'element-ui'
export default {
    install(Vue, options) {
        Vue.prototype.confirm = function (params) {
            MessageBox.confirm(params.content, "提示", {
                confirmButtonText: "确定",
                cancelButtonText: "取消",
                type: "warning"
            }).then(() => {
                params.fn && params.fn(params.id || '')
            }).catch(() => {
                params.catchFn && params.catchFn(params.id || '')
            });
        }
    }
}